All Questions
79 questions
4votes
3answers
223views
Get the contents of a table cell for all selected rows
I have a table of user info. When you click the button, I want to get the email address from each selected row, output into a comma-separated string. I got it to work with the following code, but I'm ...
4votes
1answer
553views
Setting all hidden fields based on id
I am working on a web page where there is a checkbox with a value and a hidden field. I want to ask your opinion on whether this logic is sound. My logic The checkbox has a value that matches the id ...
3votes
1answer
378views
Javascript array from IP address
I want to make this code better. It works now but I think it can be better. I have a working sample on jsfiddle. When the page loads I have the End IP Address disable until the data is entered. Then I ...
3votes
1answer
179views
Submitting form jQuery checkboxlist
In my requestForm submit function I have this logic that checks three checkboxes and then displays the label with an error message. Is there better logic? I would be happy for any kind of feedback ...
2votes
2answers
462views
jQuery form.find radio class
In my application we have four inputs that are radio controls and the first radio control is checked by default. When the user selects another radio control and then saves the form I want to get the ...
3votes
1answer
82views
eCommerce Mock App
This is a follow-up question to eCommerce Mockup App in JS. How do I implement the 'observe' pattern for the cart to regenerate html? So that, it will keep refresh its own. And any review on my coding ...
3votes
1answer
323views
Javascript Slider that controls TinySlider - feels inefficient [closed]
I feel like the main point of inefficiency is how I create "notches" and must loop through all of the created notches every time the value for the slider is changed. ...
7votes
2answers
270views
eCommerce Mockup App in JS
I have completed this mockup eCommerce app using Javascript. This version can add products into a shopping cart and automatically calculate the order summary in the shopping cart. It can also delete ...
5votes
2answers
338views
Crystals Collector game with four clickable buttons
I'm a few weeks into javascript and had to make a simple "crystals collector" app. The app works as intended, but the code is obtuse and repetitive. I'd like to make the app work using just one on ...
2votes
1answer
143views
Toggling a class in JS
I'm toggling the class of an element with this code but I'm pretty sure it can be written more efficiently. ...
4votes
1answer
207views
Whitelist for textarea and save input to file
I'm working with product codes, so a user can only scan these type of product codes into a textarea element. I don't know if my code is written the best way possible, or has good performance. I'm ...
3votes
2answers
952views
jQuery dynamic toggle class function
I wrote this function that will toggle a class of a targeted element. Applying the class js_class_toggle to any element will trigger the function when clicking on ...
0votes
1answer
101views
Updating values in a database
I'm using standard jQuery Ajax to update values in the database and reflect the result in an output. This repetition seems like bad practice and I don't know enough about jQuery to consolidate this ...
2votes
3answers
4kviews
2votes
2answers
192views
Simple menu with descriptions
If one menu-item is clicked then the description with the same data-filter attribute should be shown. I added a class to the description elements to associate each one with the affiliated menu item. ...